package com.tan.lighting.repository;


import com.tan.lighting.ddd.SingletonEntityFactory;

public class ExampleSingletonEntityFactory implements SingletonEntityFactory {

    @Override
    public <T> T createNew(Class<T> type) {
        try {
            return type.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }

}
